<?php

namespace Wonfu\Core\Database;

use Monolog\Logger;
use DI\Annotation\Inject;

class DoctrineLogger implements \Doctrine\DBAL\Logging\SQLLogger
{

    /**
     * @var Logger
     */
    private $logger;

    /**
     * @param Logger $logger
     */
    public function setLogger(Logger $logger): void
    {
        $this->logger = $logger;
    }



    /**
     * @inheritDoc
     */
    public function startQuery($sql, ?array $params = null, ?array $types = null)
    {
        $this->logger->info($sql,compact('params','types'));
    }

    /**
     * @inheritDoc
     */
    public function stopQuery()
    {
        // TODO: Implement stopQuery() method.
    }
}